import java.io.File;
import java.io.IOException;

/**
 * Created by 14229 on 2020/2/21.
 */
public class Test02 {
    public static void main(String[] args) throws IOException {
        judgeFile();

    }
    public static String judgeFile() throws IOException {
        File file = new File("模拟D盘/HelloWorld.txt");
        file.createNewFile();

        if (file.isFile()){
            System.out.println("是文件");
        }
        if (file.isDirectory()){
            System.out.println("不是文件");
        }
        return null;
    }
}
